from ast import parse, dump

from sympy import *
from sympy.core.ast_parser import parse_expr, Transform

pprint( parse_expr("2*x**2 + 3*x**2", {}) )

pprint( parse_expr("(x+2)*(x+3)-5*(x-2)", {}) )

#
#exp = compile(a, "<string>", "eval")
#pprint( exp )

#a = parse("2*x**2 + 3*x**2", mode="eval")
#print( dump( a ) )
#a = Transform({}, {}).visit(a)
#print( dump( a ) )
#
#e = compile(a, "<string>", "eval")
#print( e )
#pprint( e )
#
#e = eval(e, {}, {})
#pprint( e )


#x = Symbol('x')
#pprint( solve(3*x**3 + x**2 + 4*x -4, x) )

